home *** CD-ROM | disk | FTP | other *** search
/ HyperLib 1997 Winter - Disc 1 / HYPERLIB-1997-Winter-CD1.ISO.7z / HYPERLIB-1997-Winter-CD1.ISO / オンラインウェア / UTIL / Natural Order.sit / Natural Order / Natural Order ReadMe next >
Text File  |  1996-11-04  |  5KB  |  96 lines

  1. Natural Order
  2. ゥ1996 Stuart Cheshire <cheshire@CS.Stanford.EDU>
  3.  
  4. Introduction
  5.  
  6. Natural Order is a System Extension that improves the sorting order that your Macintosh uses when it displays lists of items.
  7.  
  8. If you have a group of numbered files on your disk and you select メView By Nameモ in the Finder, you might expect the files to be displayed in sensible numerical order, like this:
  9.  
  10. Picture1.jpg
  11. Picture2.jpg
  12. Picture3.jpg
  13. Picture4.jpg
  14. Picture5.jpg
  15. Picture6.jpg
  16. Picture7.jpg
  17. Picture8.jpg
  18. Picture9.jpg
  19. Picture10.jpg
  20. Picture11.jpg
  21. Picture12.jpg
  22.  
  23. If youユve ever had a group of numbered files on your disk, youユll know that the Finder doesnユt do this. When you select メView By Nameモ what you get looks like this:
  24.  
  25. Picture1.jpg
  26. Picture10.jpg
  27. Picture11.jpg
  28. Picture12.jpg
  29. Picture2.jpg
  30. Picture3.jpg
  31. Picture4.jpg
  32. Picture5.jpg
  33. Picture6.jpg
  34. Picture7.jpg
  35. Picture8.jpg
  36. Picture9.jpg
  37.  
  38. This looks stupid, and itユs because the System is just sorting the names lexicagraphically. By the same logic that dictates that メabモ comes alphabetically before メcモ (which is correct) the System decides that メ12モ comes before メ3モ (which is stupid). Dユoh! Natural Order works by overriding the Systemユs comparison of the numerical portions of strings, and sorts them by numerical value instead of メalphabeticalモ value.
  39.  
  40. How to use Natural Order
  41.  
  42. Drop Natural Order into the System Folder and Restart your Mac.
  43.  
  44. Restrictions
  45.  
  46. Natural Order has only been tested on System 7.5.x. It should work on other Systems, but I have not personally tested it.
  47.  
  48. Natural Order works by overriding the Systemユs IUMagString and IUMagPString functions. Programs that use their own sorting order and do not call the Systemユs comparison routines will not get any benefit from Natural Order.
  49.  
  50. Natural Order only overrides the sorting of the numeric parts of strings. It still uses your Systemユs built-in sorting function for the textual parts of strings, so if you have your system set to some foreign sorting order, that order will still be honoured by Natural Order.
  51.  
  52. Programs that benefit from Natural Order
  53.  
  54. The Finder (for メView by nameモ file lists)
  55. Standard File Dialogs (for opening and saving files, in any application)
  56. The Chooser (for the lists of zone names, file servers, etc.)
  57. Bolo (for sorting the list of zone names when you start an AppleTalk game)
  58.  
  59. If you find other programs that benefit from Natural Order, please let me know so I can add them to the list.
  60.  
  61. Programs that do not benefit from Natural Order
  62.  
  63. Nuntius 2.0.4 (for displaying lists of articles)
  64. Fetch 3.0.1 (for displaying listings of ftp sites sorted by name)
  65. Anarchie 1.6.0 (for displaying listings of ftp sites sorted by name)
  66.  
  67. If you find other programs that do not benefit from Natural Order, please let me know about those as well, so I can add them to the list, and contact the authors to see what they think about changing their programs to use natural sorting order.
  68.  
  69. It is disappointing to find that so few programs use the Macユs International Utilities (IU) sorting routines. Now that Natural Order exists, I hope that more programs will start using the IU routines to get the benefit of improved sorting order.
  70.  
  71. Programs that do not need Natural Order
  72.  
  73. Anarchie 2.0 and later [currently in development] (for displaying listings of ftp sites sorted by name)
  74.  
  75. Peter Lewis liked the idea of Natural Order, but found that calling the IU sorting routines was too slow when youユre listing a directory containing over 5000 files, so he programmed the Natural Order sorting algorithm directly into Anarchie.
  76.  
  77. The overhead of calling the IU sorting routines should not be significant for most programs. Some people, like people whose primary language is not English, may prefer to have their lists sorted a different way. Using the IU routines allows the System Software to give them their preferred sorting order, and using the IU routines with Natural Order installed gives them their preferred sorting order with smart numerical sorting as well. If your Macintosh software uses the IU routines and you want numerical sorting, you may bundle Natural Order with your software, along with this ReadMe file.
  78.  
  79. Still, if youユre sorting thousands of items and the speed penalty of using the IU routines is too much, you may incorporate the Natural Order algorithm in your software, just as long as you give me credit for it. See below for details of where to find the source code.
  80.  
  81. Frequently Asked Questions
  82.  
  83. Can I have source code for Natural Order?
  84.  
  85. You can get it by anonymous ftp from my Mac at home, bolo.stanford.edu.
  86. Look in "Public/Stuart's tech notes/Natural Order"
  87.  
  88. Licence
  89.  
  90. Natural Order is freeware. Providing that you acknowledge my authorship, you may distribute it any way you like, or do anything else with it, including producing derivative works from the source code. If my source code allows you to improve the user interface of your software, then I will be happy to have made a small contribution to improving the lives of computer users.
  91.  
  92. Version History
  93.  
  94. 0.9 Friday 21st June 1996, written overnight at MacHack, due to persistent cajoling by Quinn.
  95. 1.0 Monday 4th November 1996. Added an icon, added some balloon help, fixed a potential glitch in sorting order in some cases (for the technically inclined, Natural Order now overrides IUMagPString as well as IUMagString) and sent it off to Sumex-Aim.
  96.